home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / hard / hack / AmigaATX.lha / PowerOFF.rexx < prev    next >
OS/2 REXX Batch file  |  2002-03-28  |  904b  |  31 lines

  1. /* PowerOFF.rexx - switch the power of ATX power supply off in Amiga comuters equipped with AmigaATX */
  2. /* $VER: PowerOFF.rexx 1.0 (2.02.2002) © 2002 by Michael Dmitriev <motorola_inside@mail.ru> */
  3. /* This script will allow you to save unsaved data in the following programs: Wordworth; IBrowse, Voyager, AmFTP, AmIRC */
  4.  
  5. OPTIONS RESULTS
  6.  
  7. DO Num = 1 to 20
  8.         WwPort = "WORDWORTH." || Num
  9.         IF SHOW(PORTS, WwPort) THEN DO
  10.                 Address Value WwPort
  11.                 SAVE
  12.         CLOSE
  13.         END
  14. END
  15.  
  16. IF SHOW(PORTS,WORDWORTH.1) THEN DO
  17.         Address WORDWORTH.1 QUIT
  18. END
  19.  
  20. Ports = "IBROWSE VOYAGER AMFTP.1 AMIRC.1"  /* Script will close these applications */
  21.  
  22. DO i = 1 TO WORDS(ports)
  23.    IF SHOW('P', WORD(ports,i)) THEN 
  24.    ADDRESS value WORD(ports,i)
  25.    QUIT
  26. END
  27.  
  28. Address 'COMMAND' 'C:RequestChoice Shutdown "Amiga will be switched off" OK CENTER'
  29.  
  30. Address 'COMMAND' 'C:POKE $BFD100 4'
  31.